﻿<!--#include file="const.asp"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>


<%
if sid="Null" then
	Response.Redirect "login.asp"
	Response.end
end if
IF  Request.QueryString("Action")="login" Then
	call login
else
	call index
end if
end Function



Function index
	dim page
    		Page = Request("page")      '当前页数
    		If Page = "" Then Page = 1
   		If Not IsNumeric(Page) Then Page = 1
    		Page = CLng(Page)
    		If Page < 1 Then Page = 1
	dim rs,sql,Runtxt,id,classid
    		classid = Request("classid")
    		If classid = "" Then classid = 0
   		If Not IsNumeric(classid) Then classid = 0
    		classid = CLng(classid)
    		If classid < 0 Then classid = 0

	Runtxt=qingtian.RunStr
    		id = Request("id")    
    		If id = "" Then id = 1
   		If Not IsNumeric(id) Then id = 1
    		id = CLng(id)
    		If id < 1 Then id = 1

%>
	<card title="删除下载列表"><p align="left">
<%
		set rs=Server.CreateObject("ADODB.Recordset")
		Sql = "select top 1 *  FROM qingtian_fileli where id="&id&""
		rs.open sql,conn,1,1
		if not (rs.eof and rs.bof) then
%>
		确定删除:"<%=qingtian.utf8(rs("name"))%>"的下载列表吗?<br/>
    	<a href="delfilelist.asp?Action=login&amp;classid=<%=classid%>&amp;page=<%=page%>&amp;id=<%=id%>&amp;sid=<%=sid%>">确定删除</a><br/>
<%
		end if
		rs.Close
		Set rs = Nothing
%>

-------------<br/>
<a href='filelist.asp?classid=<%=classid%>&amp;page=<%=page%>&amp;sid=<%=sid%>'>返回下载列表管理</a><br/>
<a href='index.asp?sid=<%=sid%>'>后台管理首页</a><br/>
<%
End Function


Function login
	dim page
    		Page = Request("page")      '当前页数
    		If Page = "" Then Page = 1
   		If Not IsNumeric(Page) Then Page = 1
    		Page = CLng(Page)
    		If Page < 1 Then Page = 1

		dim rs,sql,id,i,classid
    		classid = Request("classid")
    		If classid = "" Then classid = 0
   		If Not IsNumeric(classid) Then classid = 0
    		classid = CLng(classid)
    		If classid < 0 Then classid = 0


    		id = Request("id")    
    		If id = "" Then id = 1
   		If Not IsNumeric(id) Then id = 1
    		id = CLng(id)
    		If id < 1 Then id = 1


	%>
	<card id="login" title="删除下载列表" ontimer="filelist.asp?classid=<%=classid%>&amp;page=<%=page%>&amp;sid=<%=sid%>"><timer value="20"/>
		<p align="left">
	<%

		set rs=Server.CreateObject("ADODB.Recordset")
		Sql = "select top 1 *  FROM qingtian_fileli where id="&id&""
		rs.open sql,conn,1,3
		if not (rs.eof and rs.bof) then
		rs.delete()
		end if
		rs.Close
		Set rs = Nothing



		set rs=Server.CreateObject("ADODB.Recordset")
		Sql = "select *  FROM qingtian_file_reply where listid="&id&""
		rs.open sql,conn,1,3
		if not (rs.eof and rs.bof) then
		For i=1 to rs.RecordCount
		rs.Delete
		Rs.MoveNext
		next
		end if
		rs.Close
		Set rs = Nothing

		set rs=Server.CreateObject("ADODB.Recordset")
		Sql = "select *  FROM qingtian_phoneurl where aid="&id&""
		rs.open sql,conn,1,3
		if not (rs.eof and rs.bof) then
		For i=1 to rs.RecordCount
		rs.Delete
		Rs.MoveNext
		next
		end if
		rs.Close
		Set rs = Nothing


		%>删除下载列表成功!<br/>

<a href='filelist.asp?classid=<%=classid%>&amp;page=<%=page%>&amp;sid=<%=sid%>'>返回下载列表管理</a><br/>
<a href='index.asp?sid=<%=sid%>'>后台管理首页</a><br/>
<%
end Function 


%>
